<!DOCTYPE html>
<html class="x-admin-sm"  lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/index.css">
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/index.js"></script>
    <script type="text/javascript" src="/static/js/jquery.js"></script>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body layui-table-body layui-table-main">
                    <button class="layui-btn layui-bg-black iconfont icon-daochu" id="btnExport" >
                        <svg t="1662599637826" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2410" width="20" height="20"><path d="M896.4374528 416.169984c0-26.673152-21.6236032-48.2967552-48.2967552-48.2967552H630.8069376c-26.673152 0-48.2967552 21.6236032-48.2967552 48.2967552v83.04831147H384.69522773l-2.71428266-5.36849067c-41.336832-87.44686933-35.95195733-204.128256 150.601728-199.94487467v108.91537067l172.19037866-164.757504L532.58267307 73.2889088v106.57245867c-228.64418133-5.70709333-263.651328 183.517184-157.433856 314.01028266l4.6891008 5.34664534h-88.46595414c-26.673152 0-48.2967552 21.6236032-48.2967552 48.2967552v66.78882986h-98.43616426c-26.673152 0-40.4258816 21.6236032-30.71781547 48.2967552l79.10304427 217.33485227c9.70806613 26.673152 39.20145067 48.2967552 65.87460266 48.2967552h603.70670934c23.75898453 0 37.2506624-17.16169387 33.05745066-39.76178347 0.4980736-2.77108053 0.77441707-5.619712 0.77441707-8.53497173v-463.765504z m-60.37067093 306.4528896l-21.8464256-60.02223787c-9.70806613-26.673152-39.20145067-48.2967552-65.87460267-48.2967552H303.44697173v-30.56708266c0-13.336576 10.81125547-24.14783147 24.14783147-24.14783147h315.28605013v-107.1972352c0-13.336576 10.81125547-24.14783147 24.14783147-24.14783147h144.88917333c13.336576 0 24.14783147 10.81125547 24.14783147 24.14783147v270.2311424z" fill="#ffffff" p-id="2411"></path></svg>
                        导出</button>
                    <table class="layui-table layui-form" align="center">
                        <thead >
                        <tr>
                            <th>ID</th>
                            <th>用户名</th>
<!--                            <th>性别</th>-->
                            <th>手机</th>
                            <th>邮箱</th>
                            <th>活动主题</th>
                            <th>报名费用</th>
                        </tr>
                        </thead>
                        <tbody >
                        <tr  th:each="list,listStat:${signList}">
                            <td th:text="${listStat.index+1}"></td>
                            <td th:text="${list.userInfo.realName}"></td>
<!--                            <td th:text="${list.userInfo.userSex} == 1 ? 男 : 女"></td>-->
                            <td th:text="${list.userInfo.userPhone}"></td>
                            <td th:text="${list.userInfo.userMail}"></td>
                            <td th:text="${list.activity.activityTitle}"></td>
                            <td th:text="${list.signCost}"></td>
                        </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <th colspan="3">活动人数</th>
                            <th colspan="4"><span th:text="${num}" ></span>人</th>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script >
    //全部导出
    $("#btnExport").click(function () {
        var res;
        $.ajax({
            url:'signExcel',
            method:'post',
            async:false,
            success:function (data) {
                res=data;
            }
        });
        if (res=="1"){
            layer.msg('成功导出到桌面!',{icon: 1,time:1000});
        }else {
            window.location.href="toErrorPage"
        }
    })

</script>
</html>